/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Entidades;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

/**
 *
 * @author luksCastro
 */
@Entity
@Table(name = "linealiquidacion")
@NamedQueries({
    @NamedQuery(name = "Linealiquidacion.findAll", query = "SELECT l FROM Linealiquidacion l")})
public class Linealiquidacion implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "idLineaLiq")
    private Integer idLineaLiq;
    @Column(name = "cantidad")
    private Integer cantidad;
    // @Max(value=?)  @Min(value=?)//if you know range of your decimal fields consider using these annotations to enforce field validation
    @Column(name = "importe")
    private Float importe;
    @JoinColumn(name = "id_liquidacion", referencedColumnName = "idLiquidacion")
    @ManyToOne
    private Liquidacion idLiquidacion;
    @JoinColumn(name = "id_concepto", referencedColumnName = "idConceptoLiq")
    @ManyToOne
    private Conceptoliquidacion idConcepto;

    public Linealiquidacion() {
    }

    public Linealiquidacion(Integer idLineaLiq) {
        this.idLineaLiq = idLineaLiq;
    }

    public Integer getIdLineaLiq() {
        return idLineaLiq;
    }

    public void setIdLineaLiq(Integer idLineaLiq) {
        this.idLineaLiq = idLineaLiq;
    }

    public Integer getCantidad() {
        return cantidad;
    }

    public void setCantidad(Integer cantidad) {
        this.cantidad = cantidad;
    }

    public Float getImporte() {
        return importe;
    }

    public void setImporte(Float importe) {
        this.importe = importe;
    }

    public Liquidacion getIdLiquidacion() {
        return idLiquidacion;
    }

    public void setIdLiquidacion(Liquidacion idLiquidacion) {
        this.idLiquidacion = idLiquidacion;
    }

    public Conceptoliquidacion getIdConcepto() {
        return idConcepto;
    }

    public void setIdConcepto(Conceptoliquidacion idConcepto) {
        this.idConcepto = idConcepto;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idLineaLiq != null ? idLineaLiq.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Linealiquidacion)) {
            return false;
        }
        Linealiquidacion other = (Linealiquidacion) object;
        if ((this.idLineaLiq == null && other.idLineaLiq != null) || (this.idLineaLiq != null && !this.idLineaLiq.equals(other.idLineaLiq))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "Entidades.Linealiquidacion[ idLineaLiq=" + idLineaLiq + " ]";
    }
    
}
